package Clone.create;



import Clone.model.Model1;
import Clone.model.Model2;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by wangyg on 2016/11/10.
 */
public class ObjectCreator {
	public Model2 createObj() {
		Model2 model2 = new Model2();
		Model1 model1 = new Model1();

		//create model1
		model1.setOne("one");
		model1.setTwo("two");
		model1.setThree(3);
		Map<String, String> map = new HashMap<String, String>();
		map.put("four", "four");
		List<Integer> list = new ArrayList<Integer>();
		list.add(5);
		model1.setFour(map);
		model1.setFive(list);

		//create List<Model1>
		List<Model1> list2 = new ArrayList<Model1>();
		list2.add(model1);

		//Create model2
		model2.setId(123456789);
		model2.setModel(list2);
		model2.setMsg("创建完成");
		return model2;
	}
}
